﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Demo0617
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Post第一种方法
            string username = Request.Form["TextBox1"];
            string password = Request.Form["TextBox2"];

            //输出：
            Response.Write($"<h1>欢迎你，{username}，你的密码是：{password}<h1 /><br/><br/>");

            //Get方法
            string username1 = Request.QueryString["n"];
            string password1 = Request.QueryString["p"];

            //输出：
            Response.Write($"<h1>欢迎你，{username1}，你的密码是：{password1}<h1 /><br/><br/>");


        }
    }
}